Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: node create --k3s-arg flag #1032

Merged
merged 1 commit into from
Mar 26, 2022
Merged

add: node create --k3s-arg flag #1032

merged 1 commit into from
Mar 26, 2022

Conversation

iwilltry42
Copy link
Member

fixes #716

$ k3d cluster create test -a 1
...

$ k3d node create testnode2 --role agent --cluster test --k3s-arg '--node-label=foo=bar'
...

$ docker inspect k3d-testnode2-0
...
"Cmd": [
                "agent",
                "--node-label=foo=bar"
            ],
...

$ k3d node create testnode3 --role agent --cluster test --k3s-arg '--node-label=spam=eggs'
...

$ kubectl get nodes --show-labels                                                                                      
NAME                STATUS   ROLES                  AGE     VERSION        LABELS
k3d-testnode2-0     Ready    <none>                 4m11s   v1.22.7+k3s1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=k3s,beta.kubernetes.io/os=linux,foo=bar,kubernetes.io/arch=amd64,kubernetes.io/hostname=k3d-testnode2-0,kubernetes.io/os=linux,node.kubernetes.io/instance-type=k3s
k3d-testnode3-0     Ready    <none>                 3m44s   v1.22.7+k3s1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=k3s,beta.kubernetes.io/os=linux,foo=bar,kubernetes.io/arch=amd64,kubernetes.io/hostname=k3d-testnode3-0,kubernetes.io/os=linux,node.kubernetes.io/instance-type=k3s,spam=eggs
k3d-test-agent-0    Ready    <none>                 8m47s   v1.22.7+k3s1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=k3s,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=k3d-test-agent-0,kubernetes.io/os=linux,node.kubernetes.io/instance-type=k3s
k3d-test-server-0   Ready    control-plane,master   8m52s   v1.22.7+k3s1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=k3s,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=k3d-test-server-0,kubernetes.io/os=linux,node-role.kubernetes.io/control-plane=true,node-role.kubernetes.io/master=true,node.kubernetes.io/instance-type=k3s

@iwilltry42 iwilltry42 self-assigned this Mar 26, 2022
@iwilltry42 iwilltry42 added the enhancement New feature or request label Mar 26, 2022
@iwilltry42 iwilltry42 added this to the v5.4.0 milestone Mar 26, 2022
@iwilltry42 iwilltry42 merged commit b1374e5 into main Mar 26, 2022
@iwilltry42 iwilltry42 deleted the iwilltry42/issue716 branch March 26, 2022 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Support k3s arguments in k3d node create
1 participant